Update go dependencies, coverage, static analysis and lint updates#1529
Merged
Conversation
jehiah
force-pushed
the
go_deps_1529
branch
2 times, most recently
from
July 16, 2026 14:41
b9a56ca to
fae6720
Compare
There was a problem hiding this comment.
Pull request overview
This PR modernizes the project’s Go toolchain and CI/linting stack, then applies the mechanical code updates needed to satisfy stricter vet/static analysis (primarily checking or explicitly discarding error returns) while also refreshing tests/fixtures.
Changes:
- Update Go module/tooling and refresh CI to newer Go versions, golangci-lint, and Coveralls action-based coverage.
- Fix newly surfaced static-analysis issues across servers, apps, and internals (error handling, deadlines, close/flush semantics, deprecated APIs).
- Regenerate TLS fixtures and adjust tests to match newer Go/runtime expectations.
Reviewed changes
Copilot reviewed 75 out of 76 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test.sh | Runs go test with -vet=all and removes separate go vet invocation. |
| nsqlookupd/tcp.go | Adds error-aware closes and response send logging. |
| nsqlookupd/nsqlookupd.go | Logs listener close failures during shutdown. |
| nsqlookupd/nsqlookupd_test.go | Stops ignoring network/write/close errors in tests. |
| nsqlookupd/http.go | Updates http_api.Err literals to keyed fields. |
| nsqlookupd/http_test.go | Stops ignoring response-body close errors and tempdir cleanup. |
| nsqd/topic.go | Propagates/handles errors for topic/channel delete/empty/flush paths. |
| nsqd/topic_test.go | Stops ignoring filesystem cleanup and message put errors; simplifies busy-waits. |
| nsqd/test/certs/server.req | Regenerated TLS CSR fixture. |
| nsqd/test/certs/server.pem | Regenerated server certificate fixture. |
| nsqd/test/certs/server.key | Regenerated server private key fixture (PKCS8). |
| nsqd/test/certs/client.req | Regenerated TLS CSR fixture. |
| nsqd/test/certs/client.pem | Regenerated client certificate fixture. |
| nsqd/test/certs/client.key | Regenerated client private key fixture (PKCS8). |
| nsqd/test/certs/ca.srl | Updates CA serial file to match regenerated certs. |
| nsqd/test/certs/ca.pem | Regenerated CA certificate fixture. |
| nsqd/test/certs/ca.key | Regenerated encrypted CA private key fixture. |
| nsqd/test/cert.sh | Updates OpenSSL args to explicitly generate RSA-2048/SHA256 CA. |
| nsqd/tcp.go | Explicitly discards send/close errors (errcheck compliance). |
| nsqd/statsd.go | Explicitly discards statsd client errors and flush/close errors. |
| nsqd/stats_test.go | Stops ignoring put/close/start-timeout errors; updates snappy writer usage. |
| nsqd/protocol_v2.go | Checks deadline-setting errors; handles StartInFlightTimeout errors. |
| nsqd/options.go | Handles io.WriteString return per stricter checking. |
| nsqd/nsqd.go | Uses strings.ReplaceAll; improves close/unlock error handling; adjusts TLS client auth default. |
| nsqd/nsqd_test.go | Stops ignoring cleanup and Put/Persist/Delete errors; fixes TestReconfigure port propagation; simplifies waits. |
| nsqd/lookup.go | Stops ignoring peer close errors; checks initial peer command start. |
| nsqd/lookup_peer.go | Checks deadline setting; stops ignoring close errors on failure paths. |
| nsqd/http.go | Uses keyed http_api.Err; checks PersistMetadata errors; stops ignoring write errors in a few paths. |
| nsqd/http_test.go | Adds file-level errcheck suppression and updates many defers/close calls. |
| nsqd/client_v2.go | Uses snappy buffered writer, tracks it for Flush; checks TLS deadlines. |
| nsqd/channel.go | Propagates/handles errors for client close, empty/flush, and requeue put paths. |
| nsqd/channel_test.go | Stops ignoring cleanup, in-flight, requeue, empty, and close errors in tests. |
| nsqadmin/test/server.req | Regenerated TLS CSR fixture. |
| nsqadmin/test/server.pem | Regenerated server certificate fixture. |
| nsqadmin/test/server.key | Regenerated server private key fixture (PKCS8). |
| nsqadmin/test/client.req | Regenerated TLS CSR fixture. |
| nsqadmin/test/client.pem | Regenerated client certificate fixture. |
| nsqadmin/test/client.key | Regenerated client private key fixture (PKCS8). |
| nsqadmin/test/ca.srl | Updates CA serial file to match regenerated certs. |
| nsqadmin/test/ca.pem | Regenerated CA certificate fixture. |
| nsqadmin/test/ca.key | Regenerated encrypted CA private key fixture. |
| nsqadmin/nsqadmin.go | Checks/logs response body close and listener close errors. |
| nsqadmin/nsqadmin_test.go | Stops ignoring cleanup and response-body close errors. |
| nsqadmin/http.go | Adds template execute error handling; updates http_api.Err keyed fields; updates sort wrapper struct usage; uses ReplaceAll. |
| nsqadmin/http_test.go | Stops ignoring cleanup and response-body close errors; checks PutMessage errors in setup. |
| internal/writers/spread_writer.go | Stops ignoring write errors during flush loop. |
| internal/test/assertions.go | Adds t.Helper() to custom assertions for better failure attribution. |
| internal/statsd/host.go | Uses strings.ReplaceAll for host key normalization. |
| internal/lg/lg.go | Explicitly discards logger.Output error return. |
| internal/http_api/compress.go | Explicitly discards gzip/flate Close errors in defers. |
| internal/http_api/api_response.go | Checks response write errors in PlainText; improves JSON error body on marshal failure; explicitly discards handler return values in Decorate. |
| internal/http_api/api_request.go | Changes response body close handling for GETV1/POSTV1. |
| internal/dirlock/dirlock.go | Ensures Unlock returns flock error vs close error deterministically. |
| internal/clusterinfo/types.go | Updates semver import to /v4. |
| internal/clusterinfo/data.go | Updates semver import to /v4. |
| go.sum | Updates dependency checksums for bumped dependencies. |
| go.mod | Updates go directive and bumps/updates module dependencies. |
| coverage.sh | Removes goveralls push path and simplifies package enumeration. |
| bench/bench_writer/bench_writer.go | Stops ignoring socket and protocol I/O errors in benchmarks. |
| bench/bench_reader/bench_reader.go | Stops ignoring socket/protocol I/O and flush/finish errors in benchmarks. |
| bench/bench_channels/bench_channels.go | Stops ignoring socket/protocol I/O and flush/finish errors in benchmarks. |
| apps/to_nsq/to_nsq.go | Updates go-nsq ConfigFlag usage to keyed field. |
| apps/nsqlookupd/main.go | Checks flag parsing errors; checks Stop() error in failure path. |
| apps/nsqlookupd/main_test.go | Checks flag parsing errors. |
| apps/nsqd/main.go | Checks flag parsing errors; checks Stop() error in failure path. |
| apps/nsqd/main_test.go | Checks flag parsing/decode/close/new errors. |
| apps/nsqadmin/main.go | Checks flag parsing errors; checks Stop() error in failure path. |
| apps/nsqadmin/main_test.go | Checks flag parsing errors. |
| apps/nsq_to_nsq/nsq_to_nsq.go | Updates go-nsq ConfigFlag usage to keyed field. |
| apps/nsq_to_http/nsq_to_http.go | Checks io.Copy and response-body close errors; updates ConfigFlag usage. |
| apps/nsq_to_file/nsq_to_file.go | Checks flag parsing and ConfigFlag.Set errors; uses keyed ConfigFlag field. |
| apps/nsq_to_file/file_logger.go | Uses strings.ReplaceAll for token replacement. |
| apps/nsq_tail/nsq_tail.go | Updates ConfigFlag usage; changes default channel generation behavior. |
| .github/workflows/test.yml | Refreshes runner, Go matrix, linting, and coverage action usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jehiah
marked this pull request as ready for review
July 16, 2026 16:49
mkboice
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Go dependency & toolchain modernization
Brings the build, tooling, and code up to date with current Go and its stricter static analysis.
Dependencies & toolchain
go.modto Go 1.25 and update dependencies (BurntSushi/toml,go-hostpool,golang/snappyv1,blang/semver→/v4,stretchr/testify,golang.org/x/sys).ubuntu-latest, and refresh GitHub Actions (checkout@v7,setup-go@v7) to keep the pipeline running on supported runners.Linting
staticcheckaction withgolangci-lint(v2.12) in CI, giving broader coverage (errcheck, etc.) in one tool.Static-analysis fixes
nsqd,nsqadmin,nsqlookupd,internal/, andapps/(checking or explicitly discarding them). A few carry real behavior improvements, e.g.RespondV1now marshals a proper JSON error body on marshal failure instead of writing a bareerror.Coverage
goverallsinstall-and-script approach to the maintainedcoverallsapp/github-action.Test & fixture fixes
TestReconfigure: carryBroadcastTCPPort/BroadcastHTTPPortonto the swapped-in options so the nsqd→nsqlookupdIDENTIFYincludes non-zero ports (mirrors how real config reload copies current opts) — previously the test failed withIDENTIFY missing fields.rsa:2048/sha256, since the old fixtures no longer satisfy newer Go TLS defaults.